package com.zhongwang.mms.module.material.dao;

import com.zhongwang.mms.gen.entity.MCheckPlan;
import com.zhongwang.mms.gen.entity.MCheckPlanExample;
import com.zhongwang.mms.module.material.model.MCheckPlanModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MCheckPlanDao {
    long countByExample(MCheckPlanExample example);

    int deleteByExample(MCheckPlanExample example);

    int deleteByPrimaryKey(Integer cpnId);

    int insert(MCheckPlan record);

    int insertSelective(MCheckPlan record);

    List<MCheckPlan> selectByExample(MCheckPlanExample example);

    MCheckPlan selectByPrimaryKey(Integer cpnId);

    int updateByExampleSelective(@Param("record") MCheckPlan record, @Param("example") MCheckPlanExample example);

    int updateByExample(@Param("record") MCheckPlan record, @Param("example") MCheckPlanExample example);

    int updateByPrimaryKeySelective(MCheckPlan record);

    int updateByPrimaryKey(MCheckPlan record);

    /*--myself--*/

    /**
     * 获取盘点计划
     *
     * @param cpnId 盘点计划Id
     * @return
     */
    List<MCheckPlanModel> findCheckPlanByPrimaryKey(Integer cpnId);

    /**
     * 查询盘点计划列表
     * @param checkPlanModel
     * @return
     */
    List<MCheckPlan> findMChangeOrderByQuery(MCheckPlanModel checkPlanModel);
}